import request from '@u/request'

// 请求分类列表
const getCates = (params = {}) => request.get('/cate/list', {params})
// 新增分类
const addCate = (data = {}) => request.post('/cate/add', data)
// 获取分类详情
const getCate = (id: number) => request.get('/cate/detail', {params: {id}})
// 修改商品分类
const updateCate = (params = {}) => request.put('/cate/update', params)
// 删除商品分类
const delCate = (id: number) => request.delete('/cate/del', {params: {id}})
export {
  getCates,
  addCate,
  getCate,
  updateCate,
  delCate
}